import request from "@/utils/request";
// 查询章节列表
export function listPost_chapterTemporary(query) {
  return request({
    url: "/manager/course/chapterTemporary/list",
    method: "get",
    params: query,
  });
}
// 章节排序
export function sort_chapterTemporary(data) {
  return request({
    url: "/manager/course/chapterTemporary/sort",
    method: "post",
    data: data,
  });
}
// 查询章节详细
export function getPost_chapterTemporary(postId) {
  return request({
    url: "/manager/course/chapterTemporary/" + postId,
    method: "get",
  });
}

// 新增章节
export function addPost_chapterTemporary(data) {
  return request({
    url: "/manager/course/chapterTemporary",
    method: "post",
    data: data,
  });
}

// 修改章节
export function updatePost_chapterTemporary(data) {
  return request({
    url: "/manager/course/chapterTemporary",
    method: "put",
    data: data,
  });
}
// 修改章节名称
export function updatePost_chapterTemporaryName(data) {
  return request({
    url: "/manager/course/chapterTemporaryName",
    method: "put",
    headers: {
      "Content-Type": "application/x-www-form-urlencoded",
    },
    data: data,
  });
}

// 删除章节
export function delPost_chapterTemporary(postId) {
  return request({
    url: "/manager/course/chapterTemporary/" + postId,
    method: "delete",
  });
}

// 查询章节类型列表
export function listPost_chapterType(query) {
  return request({
    url: "/manager/course/chapterTypeTemporary/list",
    method: "get",
    params: query,
  });
}

// 查询章节类型详细
export function getPost_chapterType(postId) {
  return request({
    url: "/manager/course/chapterTypeTemporary/" + postId,
    method: "post",
  });
}

// 新增章节类型
export function addPost_chapterType(data) {
  return request({
    url: "/manager/course/chapterTypeTemporary",
    method: "post",
    data: data,
  });
}

// 修改章节类型
export function updatePost_chapterType(data) {
  return request({
    url: "/manager/course/chapterTypeTemporary",
    method: "put",
    data: data,
  });
}

// 删除章节类型
export function delPost_chapterType(postId) {
  return request({
    url: "/manager/course/chapterTypeTemporary/" + postId,
    method: "delete",
  });
}
